﻿Imports System.Data.SqlClient

Public Class frmIssueSlipInsurance

    Public LineOfBuiness As String

    Private Sub frmIssueSlipInsurance_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Try
            'Check slip type
            If LineOfBuiness = "Fidelity Guarantee Insurance" Then
               
            End If

            If LineOfBuiness = "Contractor's All Risks" Then
                Dim a As New frmSlipCAR
                a.ClassOfBuiness = "Engineering"
                a.LineOfBuiness = "Contractor's All Risks"
                a.Abbreviation = "CAR"
                a.MdiParent = Me
                a.Show()

            End If

            If LineOfBuiness = "Fire and Allied Perils" Then
                Dim a As New frmSlipFAP
                a.ClassOfBuiness = "Property"
                a.LineOfBuiness = "Fire and Allied Perils"
                a.Abbreviation = "FAP"
                a.MdiParent = Me
                a.Show()

            End If

            'If LineOfBuiness = "" Then
            '    Dim a As New frmSlipInlandTransit
            '    a.ClassOfBuiness = ""
            '    a.LineOfBuiness = ""
            '    a.Abbreviation = ""
            '    a.MdiParent = Me
            '    a.Show()
            'End If

            'If LineOfBuiness = "" Then
            '    Dim a As New frmSlipMAC
            '    a.ClassOfBuiness = ""
            '    a.LineOfBuiness = ""
            '    a.Abbreviation = ""
            '    a.MdiParent = Me
            '    a.Show()
            'End If

            If LineOfBuiness = "Marine Cargo Insurance" Then
                Dim a As New frmSlipMarineCargo
                a.ClassOfBuiness = "Marine Cargo"
                a.LineOfBuiness = "Marine Cargo Insurance"
                a.Abbreviation = "MAC"
                a.MdiParent = Me
                a.Show()

            End If

            If LineOfBuiness = "Deterioration of Stock" Then
                Dim a As New frmSlipMBD
                a.ClassOfBuiness = "Engineering"
                a.LineOfBuiness = "Deterioration of Stock"
                a.Abbreviation = "FGI"
                a.MdiParent = Me
                a.Show()

            End If

            If LineOfBuiness = "Money" Then
                Dim a As New frmSlipMON
                a.ClassOfBuiness = "General Accident"
                a.LineOfBuiness = "Money"
                a.Abbreviation = "MON"
                a.MdiParent = Me
                a.Show()

            End If

            If LineOfBuiness = "All Risks Insurance" Then
                Dim a As New frmSlipPAR
                a.ClassOfBuiness = "Property"
                a.LineOfBuiness = "All Risks Insurance"
                a.Abbreviation = "PAR"
                a.MdiParent = Me
                a.Show()

            End If


            'If LineOfBuiness = "" Then
            '    Dim a As New frmSlipPEI
            '    a.ClassOfBuiness = "General Accident"
            '    a.LineOfBuiness = ""
            '    a.Abbreviation = "FGI"
            '    a.MdiParent = Me
            '    a.Show()

            'End If


            If LineOfBuiness = "Product Liability" Then
                Dim a As New frmSlipPPL
                a.ClassOfBuiness = "General Accident"
                a.LineOfBuiness = "Product Liability"
                a.Abbreviation = "PLL"
                a.MdiParent = Me
                a.Show()

            End If


            If LineOfBuiness = "Professional Indemnity" Then
                Dim a As New frmSlipPUL
                a.ClassOfBuiness = "General Accident"
                a.LineOfBuiness = "Professional Indemnity"
                a.Abbreviation = "PII"
                a.MdiParent = Me
                a.Show()

            End If


            If LineOfBuiness = "Workman's Compensation" Then
                Dim a As New frmSlipWCA
                a.ClassOfBuiness = "General Accident"
                a.LineOfBuiness = "Workman's Compensation"
                a.Abbreviation = "FGI"
                a.MdiParent = Me
                a.Show()

            End If



        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class